#include<bits/stdc++.h>
using namespace std;
#define int long long
int read()
{
    int a=0,b=1;
    char c='\0';
    while(c<'0' || c>'9')
    {
        if(c=='-')
        {
            b*=-1;
        }
        c=getchar();
    }
    while(c>='0' && c<='9')
    {
        a=(a<<3)+(a<<1)+(c-'0');
        c=getchar();
    }
    return a*b;
}

const int MAXN=100005;

int a[MAXN],c[MAXN];

signed main()
{
    freopen("arena.in","r",stdin);
    freopen("arena.out","w",stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    int n,m;
    cin>>n>>m;
    srand(time(0));
    //cout<<rand()%(rand()%(n*m))+1<<endl;
    cout<<rand()%(n*m)+1<<endl;
    return 0;
}
